package com.example.active.sf;

import org.apache.activemq.broker.BrokerService;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/9/17 14:43
 */
public class EmbedBroker
{
    public static void main(String[] args) throws Exception
    {
        //ActiveMQ也支持在vm中通信基于嵌入式的broker
        BrokerService brokerService = new BrokerService();
        brokerService.setUseJmx(true);
        brokerService.addConnector("tcp://localhost:61616");
        brokerService.start();
    }
}
